package com.tiancheng.trade.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tiancheng.trade.order.mapper.VipEquityMapper;
import com.tiancheng.trade.order.model.VipEquity;
import com.tiancheng.trade.order.service.VipEquityService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

/**
 * @Author: likailun
 * @Description:
 * @Date: create in 2022/7/28 4:09 PM
 */
@Service
public class VipEquityServiceImpl implements VipEquityService {
    @Resource
    private VipEquityMapper vipEquityMapper;
    @Override
    public void saveBatch(List<VipEquity> list) {
        vipEquityMapper.saveBatch(list);
    }

    @Override
    public List<VipEquity> findByOrderId(Collection<String> orderIds) {
        return vipEquityMapper.selectList(new QueryWrapper<VipEquity>().in("order_id",orderIds));
    }

    @Override
    public List<VipEquity> groupByOrderIds(List<String> orderIds) {
        return vipEquityMapper.groupByOrderIds(orderIds);
    }
}
